[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 inline                  Inline Function Modifier

 inline datatype [classname::]functionname (parameters) {statements;}

            The inline modifier in front of a function definition
    declares it to be a C++ inline function. An inline function is
    expanded in line when it is used instead of being called, much like a
    macro. Declaring an inline function saves the overhead of calling and
    returning from a function, but since it is fully expanded in line,
    you should reserve this option for small functions.

      Notes:    If you both declare and define a member function
                within its class, that function is called an inline
                function and you do not have to use the inline modifier.

   -------------------------------- Example ---------------------------------

         inline int my_class::my_func(void) {return my_data;}




This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson